Exception condition determination at a control unit in an i/o processing system

ABSTRACT

A computer program product, apparatus, and method for providing exception condition feedback at a control unit to a channel subsystem in an I/O processing system are provided. The computer program product includes a tangible storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method. The method includes receiving a command message at the control unit from the channel subsystem, and detecting an exception condition in response to unsuccessful execution of at least one command in the command message. The method further includes identifying a termination reason code associated with the exception condition, writing the termination reason code to a response message, and sending the response message to the channel subsystem.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present disclosure relates generally to input/output processing, andin particular, to providing feedback of exception conditions forinput/output processing at a control unit to a channel subsystem.

2. Description of Background

Input/output (I/O) operations are used to transfer data between memoryand I/O devices of an I/O processing system. Specifically, data iswritten from memory to one or more I/O devices, and data is read fromone or more I/O devices to memory by executing I/O operations.

To facilitate processing of I/O operations, an I/O subsystem of the I/Oprocessing system is employed. The I/O subsystem is coupled to mainmemory and the I/O devices of the I/O processing system and directs theflow of information between memory and the I/O devices. One example ofan I/O subsystem is a channel subsystem. The channel subsystem useschannel paths as communications media. Each channel path includes achannel coupled to a control unit, the control unit being furthercoupled to one or more I/O devices.

The channel subsystem may employ channel command words (CCWs) totransfer data between the I/O devices and memory. A CCW specifies thecommand to be executed. For commands initiating certain I/O operations,the CCW designates the memory area associated with the operation, theaction to be taken whenever a transfer to or from the area is completed,and other options.

During I/O processing, a list of CCWs is fetched from memory by achannel. The channel parses each command from the list of CCWs andforwards a number of the commands, each command in its own entity, to acontrol unit coupled to the channel. The control unit then processes thecommands. The channel tracks the state of each command and controls whenthe next set of commands are to be sent to the control unit forprocessing. The channel ensures that each command is sent to the controlunit in its own entity. Further, the channel infers certain informationassociated with processing the response from the control unit for eachcommand.

Performing I/O processing on a per CCW basis may involve a large amountof processing overhead for the channel subsystem, as the channels parseCCWs, track state information, and react to responses from the controlunits. Therefore, it may be beneficial to shift much of the processingburden associated with interpreting and managing CCW and stateinformation from the channel subsystem to the control units. Simplifyingthe role of channels in communicating between the control units and anoperating system in the I/O processing system may increase communicationthroughput as less handshaking is performed. However, altering commandsequences, as well as roles of the channel subsystem and the controlunits, can cause difficulties in detecting and reporting exceptionconditions associated with the I/O processing. When multiple commandsare passed through the channel subsystem to the control units, theburden of detecting exception conditions, such as errors in the commandsis placed on the control units. The control units must then providefeedback of any exception conditions to the channel subsystem to triggerexception handling for mitigating exception conditions. Accordingly,there is a need in the art for providing feedback of exceptionconditions for input/output processing at a control unit to a channelsubsystem.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the invention include a computer program product forproviding exception condition feedback at a control unit to a channelsubsystem in an I/O processing system. The computer program productincludes a tangible storage medium readable by a processing circuit andstoring instructions for execution by the processing circuit forperforming a method. The method includes receiving a command message atthe control unit from the channel subsystem, and detecting an exceptioncondition in response to unsuccessful execution of at least one commandin the command message. The method further includes identifying atermination reason code associated with the exception condition, writingthe termination reason code to a response message, and sending theresponse message to the channel subsystem.

Additional embodiments include an apparatus for providing exceptioncondition feedback in an I/O processing system. The apparatus includes acontrol unit in communication with a channel subsystem. The control unitperforms a method that includes receiving a command message at thecontrol unit from the channel subsystem, and detecting an exceptioncondition in response to unsuccessful execution of at least one commandin the command message. The method performed by the control unit alsoincludes identifying a termination reason code associated with theexception condition, writing the termination reason code to a responsemessage, and sending the response message to the channel subsystem.

Further embodiments include a method for providing exception conditionfeedback at a control unit to a channel subsystem in an I/O processingsystem. The method includes receiving a command message at the controlunit from the channel subsystem, and detecting an exception condition inresponse to unsuccessful execution of at least one command in thecommand message. The method additionally includes identifying atermination reason code associated with the exception condition, writingthe termination reason code to a response message, and sending theresponse message to the channel subsystem.

An additional embodiment includes a computer program product forproviding exception condition feedback at a control unit to a channelsubsystem in an I/O processing system. The computer program productincludes a tangible storage medium readable by a processing circuit andstoring instructions for execution by the processing circuit forperforming a method. The method includes receiving a transport commandinformation unit (IU) message at the control unit from the channelsubsystem, and detecting an exception condition in response tounsuccessful execution of at least one command in the transport commandIU message. The method also includes identifying a termination reasoncode and a reason code qualifier providing encoded meaning correspondingto the termination reason code associated with the exception condition.The method further includes writing the termination reason code and thereason code qualifier to an extended status section of a transportresponse IU message, and sending the transport response IU message tothe channel subsystem.

A further embodiment includes an apparatus for providing exceptioncondition feedback. The apparatus includes a control unit incommunication with a channel subsystem. The control unit performs amethod that includes receiving a transport command IU message at thecontrol unit from the channel subsystem, and detecting an exceptioncondition in response to unsuccessful execution of at least one commandin the transport command IU message. The method performed by the controlunit also includes identifying a termination reason code and a reasoncode qualifier providing encoded meaning corresponding to thetermination reason code associated with the exception condition. Themethod performed by the control unit additionally includes writing thetermination reason code and the reason code qualifier to an extendedstatus section of a transport response IU message, and sending thetransport response IU message to the channel subsystem.

Other computer program products, apparatuses, and/or methods accordingto embodiments will be or become apparent to one with skill in the artupon review of the following drawings and detailed description. It isintended that all such additional computer program products,apparatuses, and/or methods be included within this description, bewithin the scope of the present invention, and be protected by theaccompanying claims.

BRIEF DESCRIPTION OF THE DRAWINGS

The subject matter which is regarded as the invention is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The foregoing and other objects, features, andadvantages of the invention are apparent from the following detaileddescription taken in conjunction with the accompanying drawings inwhich:

FIG. 1 depicts one embodiment of an I/O processing system incorporatingand using one or more aspects of the present invention;

FIG. 2 a depicts one example of a prior art channel command word;

FIG. 2 b depicts one example of a prior art channel command word channelprogram;

FIG. 3 depicts one embodiment of a prior art link protocol used incommunicating between a channel and control unlit to execute the channelcommand word channel program of FIG. 2 b;

FIG. 4 depicts one embodiment of a transport control word channelprogram, in accordance with an aspect of the present invention;

FIG. 5 depicts one embodiment of a link protocol used to communicatebetween a channel and control unit to execute the transport control wordchannel program of FIG. 4, in accordance with an aspect of the presentinvention;

FIG. 6 depicts one embodiment of a prior art link protocol used tocommunicate between a channel and control unlit in order to execute fourread commands of a channel command word channel program;

FIG. 7 depicts one embodiment of a link protocol used to communicatebetween a channel and control unit to process the four read commands ofa transport control word channel program, in accordance with an aspectof the present invention;

FIG. 8 depicts one embodiment of a control unit and a channel, inaccordance with an aspect of the present invention;

FIG. 9 depicts one embodiment of a command message communicated from achannel subsystem to a control unit, in accordance with an aspect of thepresent invention;

FIG. 10 depicts one embodiment of a response message communicated from acontrol unit to a channel subsystem, in accordance with an aspect of thepresent invention;

FIG. 11 depicts one embodiment of a portion of an interrupt responseblock in a host system, in accordance with an aspect of the presentinvention;

FIG. 12 depicts one embodiment of a process for providing feedback ofexception conditions for input/output processing at a control unit to achannel subsystem; and

FIG. 13 depicts one embodiment of a computer program productincorporating one or more aspects of the present invention.

The detailed description explains the preferred embodiments of theinvention, together with advantages and features, by way of example withreference to the drawings.

DETAILED DESCRIPTION OF THE INVENTION

In accordance with an aspect of the present invention, input/output(I/O) processing is facilitated. For instance, I/O processing isfacilitated by readily enabling access to information, such as statusand measurement data, associated with I/O processing. Further, I/Oprocessing is facilitated, in one example, by reducing communicationsbetween components of an I/O processing system used to perform the I/Oprocessing. For instance, the number of exchanges and sequences betweenan I/O communications adapter, such as a channel, and a control unit isreduced. This is accomplished by sending a plurality of commands fromthe I/O communications adapter to the control unit as a single entityfor execution by the control unit, and by the control unit sending thedata resulting from the commands, if any, as a single entity.

The plurality of commands are included in a block, referred to herein asa transport command control block (TCCB), an address of which isspecified in a transport control word (TCW). The TCW is sent from anoperating system or other application to the I/O communications adapter,which in turn forwards the TCCB in a command message to the control unitfor processing. The control unit processes each of the commands absent atracking of status relative to those individual commands by the I/Ocommunications adapter. The plurality of commands is also referred to asa channel program, which is parsed and executed on the control unitrather than the I/O communications adapter.

In an exemplary embodiment, the control unit generates a responsemessage including status and extended status information in response toexecuting the channel program. The control unit may also generate aresponse message without executing the channel program when an exceptioncondition is detected, such as an error in the channel program thatprevents execution. The control unit may include a number of elements tosupport communication between the I/O communications adapter and I/Odevices, as well as in support of channel program execution. Forexample, the control unit can include control logic to parse and processmessages, in addition to one or more queues, timers, and registers tofacilitate communication and status monitoring. The I/O communicationsadapter parses the response message, extracting the status and extendedstatus information, and provides feedback to processing elements of theI/O processing system.

One example of an I/O processing system incorporating and using one ormore aspects of the present invention is described with reference toFIG. 1. I/O processing system 100 includes a host system 101, whichfurther includes for instance, a main memory 102, one or more centralprocessing units (CPUs) 104, a storage control element 106, and achannel subsystem 108. The host system 101 may be a large scalecomputing system, such as a mainframe or server. The I/O processingsystem 100 also includes one or more control units 110 and one or moreI/O devices 112, each of which is described below.

Main memory 102 stores data and programs, which can be input from I/Odevices 112. For example, the main memory 102 may include one or moreoperating systems (OSs) 103 that are executed by one or more of the CPUs104. For example, one CPU 104 can execute a Linux® operating system 103and a z/OS® operating system 103 as different virtual machine instances.The main memory 102 is directly addressable and provides for high-speedprocessing of data by the CPUs 104 and the channel subsystem 108.

CPU 104 is the controlling center of the I/O processing system 100. Itcontains sequencing and processing facilities for instruction execution,interruption action, timing functions, initial program loading, andother machine-related functions. CPU 104 is coupled to the storagecontrol element 106 via a connection 114, such as a bidirectional orunidirectional bus.

Storage control element 106 is coupled to the main memory 102 via aconnection 116, such as a bus; to CPUs 104 via connection 114; and tochannel subsystem 108 via a connection 118. Storage control element 106controls, for example, queuing and execution of requests made by CPU 104and channel subsystem 108.

In an exemplary embodiment, channel subsystem 108 provides acommunication interface between host system 101 and control units 110.Channel subsystem 108 is coupled to storage control element 106, asdescribed above, and to each of the control units 110 via a connection120, such as a serial link. Connection 120 may be implemented as anoptical link, employing single-mode or multi-mode waveguides in a FibreChannel fabric. Channel subsystem 108 directs the flow of informationbetween I/O devices 112 and main memory 102. It relieves the CPUs 104 ofthe task of communicating directly with the I/O devices 112 and permitsdata processing to proceed concurrently with I/O processing. The channelsubsystem 108 uses one or more channel paths 122 as the communicationlinks in managing the flow of information to or from I/O devices 112. Asa part of the I/O processing, channel subsystem 108 also performs thepath-management functions of testing for channel path availability,selecting an available channel path 122 and initiating execution of theoperation with the I/O devices 112.

Each channel path 122 includes a channel 124 (channels 124 are locatedwithin the channel subsystem 108, in one example, as shown in FIG. 1),one or more control units 110 and one or more connections 120. Inanother example, it is also possible to have one or more dynamicswitches (not depicted) as part of the channel path 122. A dynamicswitch is coupled to a channel 124 and a control unit 110 and providesthe capability of physically interconnecting any two links that areattached to the switch. In another example, it is also possible to havemultiple systems, and therefore multiple channel subsystems (notdepicted) attached to control unit 110.

Also located within channel subsystem 108 are subchannels (not shown).One subchannel is provided for and dedicated to each I/O device 112accessible to a program through the channel subsystem 108. A subchannel(e.g., a data structure, such as a table) provides the logicalappearance of a device to the program. Each subchannel providesinformation concerning the associated I/O device 112 and its attachmentto channel subsystem 108. The subchannel also provides informationconcerning I/O operations and other functions involving the associatedI/O device 112. The subchannel is the means by which channel subsystem108 provides information about associated I/O devices 112 to CPUs 104,which obtain this information by executing I/O instructions.

Channel subsystem 108 is coupled to one or more control units 110. Eachcontrol unit 110 provides logic to operate and control one or more I/Odevices 112 and adapts, through the use of common facilities, thecharacteristics of each I/O device 112 to the link interface provided bythe channel 124. The common facilities provide for the execution of I/Ooperations, indications concerning the status of the I/O device 112 andcontrol unit 110, control of the timing of data transfers over thechannel path 122 and certain levels of I/O device 112 control.

Each control unit 110 is attached via a connection 126 (e.g., a bus) toone or more I/O devices 112. I/O devices 112 receive information orstore information in main memory 102 and/or other memory. Examples ofI/O devices 112 include card readers and punches, magnetic tape units,direct access storage devices, displays, keyboards, printers, pointingdevices, teleprocessing devices, communication controllers and sensorbased equipment, to name a few.

One or more of the above components of the I/O processing system 100 arefurther described in “IBM® z/Architecture Principles of Operation,”Publication No. SA22-7832-05, 6th Edition, April 2007; U.S. Pat. No.5,461,721 entitled “System For Transferring Data Between I/O Devices AndMain Or Expanded Storage Under Dynamic Control Of Independent IndirectAddress Words (IDAWS),” Cormier et al., issued Oct. 24, 1995; and U.S.Pat. No. 5,526,484 entitled “Method And System For Pipelining TheProcessing Of Channel Command Words,” Casper et al., issued Jun. 11,1996, each of which is hereby incorporated herein by reference in itsentirety. IBM is a registered trademark of International BusinessMachines Corporation, Armonk, N.Y., USA. Other names used herein may beregistered trademarks, trademarks or product names of InternationalBusiness Machines Corporation or other companies.

In one embodiment, to transfer data between I/O devices 112 and memory102, channel command words (CCWs) are used. A CCW specifies the commandto be executed, and includes other fields to control processing. Oneexample of a CCW is described with reference to FIG. 2 a. A CCW 200includes, for instance, a command code 202 specifying the command to beexecuted (e.g., read, read backward, control, sense and write); aplurality of flags 204 used to control the I/O operation; for commandsthat specify the transfer of data, a count field 206 that specifies thenumber of bytes in the storage area designated by the CCW to betransferred; and a data address 208 that points to a location in mainmemory that includes data, when direct addressing is employed, or to alist (e.g., contiguous list) of modified indirect data address words(MIDAWs) to be processed, when modified indirect data addressing isemployed. Modified indirect addressing is further described in U.S.application Ser. No. 11/464,613, entitled “Flexibly Controlling TheTransfer Of Data Between Input/Output Devices And Memory,” Brice et al.,filed Aug. 15, 2006, which is hereby incorporated herein by reference inits entirety.

One or more CCWs arranged for sequential execution form a channelprogram, also referred to herein as a CCW channel program. The CCWchannel program is set up by, for instance, an operating system, orother software. The software sets up the CCWs and obtains the addressesof memory assigned to the channel program. An example of a CCW channelprogram is described with reference to FIG. 2 b. A CCW channel program210 includes, for instance, a define extent CCW 212 that has a pointer214 to a location in memory of define extent data 216 to be used withthe define extent command. In this example, a transfer in channel (TIC)218 follows the define extent command that refers the channel program toanother area in memory (e.g., an application area) that includes one ormore other CCWs, such as a locate record 217 that has a pointer 219 tolocate record data 220, and one or more read CCWs 221. Each read CCW 220has a pointer 222 to a data area 224. The data area includes an addressto directly access the data or a list of data address words (e.g.,MIDAWs or IDAWs) to indirectly access the data. Further, CCW channelprogram 210 includes a predetermined area in the channel subsystemdefined by the device address called the subchannel for status 226resulting from execution of the CCW channel program.

The processing of a CCW channel program is described with reference toFIG. 3, as well as with reference to FIG. 2 b. In particular, FIG. 3shows an example of the various exchanges and sequences that occurbetween a channel and a control unit when a CCW channel program isexecuting. The link protocol used for the communications is FICON (FibreConnectivity), in this example. Information regarding FICON is describedin “Fibre Channel Single Byte Command Code Sets-3 Mapping Protocol(FC-SB-3), T11/Project 1357-D/Rev. 1.6, INCITS (March 2003), which ishereby incorporated herein by reference in its entirety.

Referring to FIG. 3, a channel 300 opens an exchange with a control unit302 and sends a define extent command and data associated therewith 304to control unit 302. The command is fetched from define extent CCW 212(FIG. 2 b) and the data is obtained from define extent data area 216.The channel 300 uses TIC 218 to locate the locate record CCW and theread CCW. It fetches the locate record command 305 (FIG. 3) from thelocate record CCW 217 (FIG. 2 b) and obtains the data from locate recorddata 220. The read command 306 (FIG. 3) is fetched from read CCW 221(FIG. 2 b). Each is sent to the control unit 302.

The control unit 302 opens an exchange 308 with the channel 300, inresponse to the open exchange of the channel 300. This can occur beforeor after locate command 305 and/or read command 306. Along with the openexchange, a response (CMR) is forwarded to the channel 300. The CMRprovides an indication to the channel 300 that the control unit 302 isactive and operating.

The control unit 302 sends the requested data 310 to the channel 300.Additionally, the control unit 302 provides the status to the channel300 and closes the exchange 312. In response thereto, the channel 300stores the data, examines the status and closes the exchange 314, whichindicates to the control unit 302 that the status has been received.

The processing of the above CCW channel program to read 4k of datarequires two exchanges to be opened and closed and seven sequences. Thetotal number of exchanges and sequences between the channel and controlunit is reduced through collapsing multiple commands of the channelprogram into a TCCB. The channel, e.g., channel 124 of FIG. 1, uses aTCW to identify the location of the TCCB, as well as locations foraccessing and storing status and data associated with executing thechannel program. The TCW is interpreted by the channel and is not sentor seen by the control unit.

One example of a channel program to read 4k of data, as in FIG. 2 b, butincludes a TCCB, instead of separate individual CCWs, is described withreference to FIG. 4. As shown, a channel program 400, referred to hereinas a TCW channel program, includes a TCW 402 specifying a location inmemory of a TCCB 404, as well as a location in memory of a data area 406or a TIDAL 410 (i.e., a list of transfer mode indirect data addresswords (TIDAWs), similar to MIDAWs) that points to data area 406, and astatus area 408. TCWs, TCCBs, and status are described in further detailbelow.

The processing of a TCW channel program is described with reference toFIG. 5. The link protocol used for these communications is, forinstance, Fibre Channel Protocol (FCP). In particular, three phases ofthe FCP link protocol are used, allowing host bus adapters to be usedthat support FCP to perform data transfers controlled by CCWs. FCP andits phases are described further in “Information Technology—FibreChannel Protocol for SCSI, Third Version (FCP-3),” T10 Project 1560-D,Revision 4, Sep. 13, 2005, which is hereby incorporated herein byreference in its entirety.

Referring to FIG. 5, a channel 500 opens an exchange with a control unit502 and sends TCCB 504 to the control unit 502. In one example, the TCCB504 and sequence initiative are transferred to the control unit 502 in aFCP command, referred to as FCP_CMND information unit (IU) or atransport command IU. The control unit 502 executes the multiplecommands of the TCCB 504 (e.g., define extent command, locate recordcommand, read command as device control words (DCWs)) and forwards data506 to the channel 500 via, for instance, a FCP_Data IU. It alsoprovides status and closes the exchange 508. As one example, finalstatus is sent in a FCP status frame that has a bit active in, forinstance, byte 10 or 11 of the payload of a FCP_RSP IU, also referred toas a transport response IU. The FCP_RSP IU payload may be used totransport FICON ending status along with additional status information,including parameters that support the calculation of extendedmeasurement words and notify the channel 500 of the maximum number ofopen exchanges supported by the control unit 502.

In a further example, to write 4k of customer data, the channel 500 usesthe FCP link protocol phases, as follows:

1. Transfer a TCCB in the FCP_CMND IU.

2. Transfer the IU of data, and sequence initiative to the control unit502.

3. Final status is sent in a FCP status frame that has a bit active in,for instance, byte 10 or 11 of the FCP_RSP IU Payload. The FCP_RSP_INFOfield or sense field is used to transport FICON ending status along withadditional status information, including parameters that support thecalculation of extended measurement words and notify the channel 500 ofthe maximum number of open exchanges supported by the control unit 502.

By executing the TCW channel program of FIG. 4, there is only oneexchange opened and closed (see also FIG. 5), instead of two exchangesfor the CCW channel program of FIG. 2 b (see also FIG. 3). Further, forthe TCW channel program, there are three communication sequences (seeFIGS. 4-5), as compared to seven sequences for the CCW channel program(see FIGS. 2 b-3).

The number of exchanges and sequences remain the same for a TCW channelprogram, even if additional commands are added to the program. Compare,for example, the communications of the CCW channel program of FIG. 6with the communications of the TCW channel program of FIG. 7. In the CCWchannel program of FIG. 6, each of the commands (e.g., define extentcommand 600, locate record command 601, read command 602, read command604, read command 606, locate record command 607 and read command 608)are sent in separate sequences from channel 610 to control unit 612.Further, each 4k block of data (e.g., data 614-620) is sent in separatesequences from the control unit 612 to the channel 610. This CCW channelprogram requires two exchanges to be opened and closed (e.g., openexchanges 622, 624 and close exchanges 626, 628), and fourteencommunications sequences. This is compared to the three sequences andone exchange for the TCW channel program of FIG. 7, which accomplishesthe same task as the CCW channel program of FIG. 6.

As depicted in FIG. 7, a channel 700 opens an exchange with a controlunit 702 and sends a TCCB 704 to the control unit 702. The TCCB 704includes the define extent command, the two locate record commands, andthe four read commands in DCWs, as described above. In response toreceiving the TCCB 704, the control unit 702 executes the commands andsends, in a single sequence, the 16k of data 706 to the channel 700.Additionally, the control unit 702 provides status to the channel 700and closes the exchange 708. Thus, the TCW channel program requires muchless communications to transfer the same amount of data as the CCWchannel program of FIG. 6.

Turning now to FIG. 8, one embodiment of the control unit 110 and thechannel 124 of FIG. 1 that support TCW channel program execution aredepicted in greater detail. The control unit 110 includes CU controllogic 802 to parse and process command messages containing a TCCB, suchas the TCCB 704 of FIG. 7, received from the channel 124 via theconnection 120. The CU control logic 802 can extract DCWs and controldata from the TCCB received at the control unit 110 to control a device,for instance, I/O device 112 via connection 126. The CU control logic802 sends device commands and data to the I/O device 112, as well asreceives status information and other feedback from the I/O device 112.The CU control logic 802 uses check logic 804 to perform various checksof the command messages received at the control unit 110. The checklogic 804 may also determine termination reason codes for reportingexception conditions to the channel subsystem 108 as part of a responsemessage.

The CU control logic 802 can access and control other elements withinthe control unit 110, such as CU timers 806 and CU registers 808. The CUtimers 806 may include multiple timer functions to track how much time asequence of I/O operations takes to complete. The CU timers 806 mayfurther include one or more countdown timers to monitor and abort I/Ooperations and commands that do not complete within a predeterminedperiod. The CU registers 808 can include fixed values that provideconfiguration and status information, as well as dynamic statusinformation that is updated as commands are executed by the CU controllogic 802. The control unit 110 may further include other buffer ormemory elements (not depicted) to store multiple messages or statusinformation associated with communications between the channel 124 andthe I/O device 112. The CU registers 808 may include a maximum controlunit exchange parameter that defines the maximum number of open controlunit exchanges that the control unit 110 supports.

The channel 124 in the channel subsystem 108 includes multiple elementsto support communication with the control milt 110. For example, thechannel 124 may include CHN control logic 810 that interfaces with CHNsubsystem timers 812 and CHN subsystem registers 814. In an exemplaryembodiment, the CHN control logic 810 controls communication between thechannel subsystem 108 and the control unit 110. The CHN control logic810 may directly interface to the CU control logic 802 via theconnection 120 to send commands and receive responses, such as transportcommand and response IUs. Alternatively, messaging interfaces and/orbuffers (not depicted) can be placed between the CHN control logic 810and the CU control logic 802. The CHN subsystem timers 812 may includemultiple timer functions to track how much time a sequence of I/Ooperations takes to complete, in addition to the time tracked by thecontrol unit 110. The CHN subsystem timers 812 may further include oneor more countdown timers to monitor and abort command sequences that donot complete within a predetermined period. The CHN subsystem registers814 can include fixed values that provide configuration and statusinformation, as well as dynamic status information, updated as commandsare transported and responses are received.

One example of a command message 900, e.g., a transport command IU,communicated from the channel subsystem 108 to the control unit 110 toexecute a TCW channel program is depicted in FIG. 9. The command message900 includes a header 902, a transport command header (TCH) 904, atransport command area header (TCAH) 906, a transport command area (TCA)908, and a transport command area trailer (TCAT) 910. In an exemplaryembodiment, the TCCB 404 of FIG. 4 includes the TCH 904, TCAH 906, TCA908, and TCAT 910.

The header 902 may include multiple words as address header 912,defining the highest level of header in the command message 900. Theheader 902 may include information such as channel and control unitimage IDs and a device address.

The TCH 904 includes a command reference number/task 914, which may beset to a reserved value, e.g., zero, while operating in transport mode.The TCH 904 also includes L1 length 916 and read/write field 918. The L1length 916 defines the length of the TCA 908 in words+1. The L1 length916 can be used to limit and define the size of the TCA 908. Theread/write field 918 defines whether read data, write data, or no datais being transferred in the command message 900, where a read is atransfer from the control unit 110 to the channel subsystem 108.

The TCAH 906 includes format field 920 and control field 922. The formatfield 920 and control field 922 may be set to fixed values, such as 7Fhexadecimal and zero respectively, to indicate that a variable lengthformat is used, as defined by SPC-4. SPC-4 is further described in “SCSIPrimary Commands-4 (SPC-4)”, Project T10/1731-D, Rev 11, INCITS (May2007), which is hereby incorporated herein by reference in its entirety.The TCAH 906 additionally includes reserved fields 924 and 926, as wellas L2 length 928. The L2 length 928 is also referred to astransport-command-area length (TCAL), and may represent the number ofbytes after this position in the command message 900. The L2 length 928limits the size of the TCA 908. The TCAH 906 further includes a serviceaction code 930, reserved field 932, priority 934, and reserved field936. The service action code 930 defines the type of DCWs used in theTCA 908. The priority 934 can be set equivalent to a priority byte of aFICON command header as defined in FC-SB-3.

The TCA 908 includes DCW one and control data 940, DCW two 942, DCWthree 944, and DCW four 946. The DCW one and control data 940 includesDCW fields such as a command 948, flags field 950, a reserved field 952,control data (CD) count 954, and data byte count 956. The command 948may be equivalent to a CCW command byte, but directly interpreted by thecontrol unit 110 rather than the channel subsystem 108. The flags field950 includes reserved bits as well as one or more bits assigned toparticular functions, such as indicating whether an additional DCWexists in the TCA 908 as part of a command chain. The CD count 954 isthe byte count of control data 958. The CD count 954 may be padded up tothe next 4-byte boundary so that subsequent DCWs start on a 4-byteboundary. The data byte count 956 is a four-byte count of data withoutpadding, e.g., customer data. The control data 958 exists when the CDcount 954 is not zero. In the exemplary command message 900, the DCW two942, DCW three 944, and DCW four 946 contain substantially similarfields as the DCW one and control data 940. For example, command 960,970, and 980 are formatted in a similar fashion as the command 948.Furthermore, flags field 962, 972, and 982 are formatted similar to theflags field 950. Additionally, CD count 966, 976, and 986 are formattedsimilar the CD count 954, and data byte count 968, 978, and 988 aresimilarly formatted to the data byte count 956. Although only four DCWs,including one DCW with control data (i.e., DCW one and control data 940)are depicted in the command message 900, it will be understood that avarying number of DCWs with and without control data can be included inthe command message 900, including a single DCW.

The TCAT 910 includes a longitudinal redundancy check (LRC) word 990calculated on the entire command message 900. The LRC word 990 can begenerated through applying an exclusive-or operation to an initial seedvalue with each field included in the LRC calculation in succession. TheTCAT 910 also includes a transport data byte count 992 indicating thetotal number of bytes transferred for a read or write I/O operation.

Upon sending the command message 900 to the control unit 110, thecontrol unit 110 may detect error or exception conditions with thecontents of the command message 900. The control unit 110 can alsoidentify exception conditions that result in early termination of an I/Ooperation, including errors detected by the I/O device 112. The controlunit 110 reports reason code and qualifier information back to thechannel subsystem 108 in a response message to assist in debugging andfault isolation.

One example of a response message 1000, e.g., a transport response IU,communicated from the control unit 110 to the channel 124 of the channelsubsystem 108 upon completion of a TCW channel program is depicted inFIG. 10. The response message 1000 provides status information to thechannel 124 and may indicate that an open exchange between the channel124 and the control unit 110 should be closed. The status informationprovided when a TCW channel program (e.g., as depicted in FIGS. 5 and 7)is analyzed and/or executed includes additional information beyond thestatus information sent upon completion of a CCW channel program (e.g.,as depicted in FIGS. 3 and 6). The response message 1000 includes astatus section 1002 and an extended status section 1004. When thechannel 124 receives the response message 1000, it stores parts ofstatus section 1002 in the subchannel for the device the TCW wasoperating with and the extended status section 1004 in status area 408defined by the TCW 402 of FIG. 4 associated with the TCW channel programthat triggered the response message 1000. For example, a TCW candesignate a section of main memory 102 of FIG. 1 for storage of theextended status section 1004.

The status section 1002 of the response message 1000 can includemultiple fields, such as an address header 1006, status flags one 1008,maximum control unit exchange parameter 1010, response flags 1012,response code 1014, residual count 1016, response length 1018, reservedlocation 1020, SPC-4 sense type 1022, status flags two 1024, statusflags three 1026, device status 1028, and an LRC word 1030. Each fieldin the status section 1002 is assigned to a particular byte address tosupport parsing of the response message 1000. Although one arrangementof fields within the status section 1002 is depicted in FIG. 10, it willbe understood that the order of fields can be rearranged to alternateordering within the scope of the disclosure. Moreover, fields in theresponse message 1000 can be omitted or combined within the scope of theinvention, e.g., combining status flags two 1024 and three 1026 into asingle field.

In an exemplary embodiment, the address header 1006 is set to the samevalue as the value received by the control unit 110 in the TCCB thatinitiated the TCW channel program. Although the address header 1006 isnot required, including the address header 1006 may support testing totrace command and response messages on an I/O device 112 while multipleI/O devices 112 are being accessed.

Status flags one 1008 may indicate information such as the successstatus of an I/O operation. Multiple bits within the status flags one1008 can provide additional status information. In an exemplaryembodiment, bits 0-3 of the status flags one 1008 are reserved, whilebits 4 to 7 are encoded with the following definition:

1. Null. No exception condition was encountered with the operation.

2. Device level exception. The I/O device 112 was not available.

3. Link reject. A logical path was not established to the control unit110.

4. Resetting event. A special device status is included to indicate anevent that occurred relative to the I/O device 112.

5. Device requested a program check, which may possibly be escalated toan interface control check (IFCC). The control unit 110 sets this encodewhen certain conditions are identified in the extended status 1004 forthe I/O device 112, as described in greater detail herein.

6. Device requested a program check. The control unit 110 sets thisencode when specific conditions are identified in the extended status1004, as described in greater detail herein.

7. to 15. Reserved.

The maximum control unit exchange parameter 1010 identifies the maximumnumber of exchanges that the control unit 110 allows the channel 124 toopen to it. The maximum control unit exchange parameter 1010 mayrepresent a base number to increment and/or scale to establish themaximum number of exchanges supported.

In an exemplary embodiment, the response flags field 1012 uses thestandard definition as defined in FCP and can be set to a default value,e.g., two. The response code 1014 may be equivalent to a Small ComputerSystem Interface (SCSI) status field and can be set to a default value,such as zero. The residual count 1016 for read or write commandsindicates the difference between how many bytes were commanded to beread or written versus the number of bytes that actually were read orwritten. The channel 124 checks that the channel 124 received or sentthe same amount of data that the control unit 110 sent or received usingthe residual count 1016. If there is a disagreement the channel 123terminates the operation with an IFCC set. The response length 1018 isan additional count of bytes of information in the response message 1000after the reserved location 1020. The response length 1018 supportsvariable sized response messages 1000. The SPC-4 sense type 1022 can beassigned to a value of 7F hexadecimal which identifies this response IUas vender unique.

In one embodiment, the status flags two 1024 provides status forvalidity of the residual count 1016, an initial status indication, and arequest to generate a log record of an event. Invalidity of the residualcount 1016 may result in an IFCC because of a link protocol error.Status flags three 1026 is set to a value of one to indicate thatextended status 1004 is included as part of the response message 1000.The device status 1028 relays status information generated by the I/Odevice 112. The LRC word 1030 is a check word that covers the otherfields in the status section 1002 of the response message 1000 to verifythe integrity of the status section 1002. The LRC word 1030 can begenerated through applying an exclusive-or operation to an initial seedvalue with each field included in the LRC calculation in succession.

The extended status section 1004 provides information to the channelsubsystem 108 and the OS 103 associated with operating the control unit110 in a transport mode capable of running a TCW channel program. Theextended status section 1004 may support configurable definitions withdifferent type status definitions for each type. In an exemplaryembodiment, the extended status section 1004 includes a transport statusheader (TSH) 1032, a transport status area (TSA) 1034, and an LRC word1036 of the TSH 1032 and the TSA 1034. The TSH 1032 may include extendedstatus length 1040, extended status flags 1042, a DCW offset 1044, a DCWresidual count 1046, and a reserved location 1048. The TSH 1032 iscommon for the different formats, with each format defined by a typecode in the extended status flags 1042. The TSA 1034 may include areserved value 1050, a termination reason code 1052, reason codequalifier (RCQ) words 1054, and appended device sense data 1056. Each ofthese fields is described in greater detail in turn.

The extended status length 1040 is the size of the extended statussection 1004. In an exemplary embodiment, the extended status flags 1042has the following definition:

Bit 0—The DCW offset 1044 is valid.

Bit 1—The DCW residual count 1046 is valid.

Bit 2—This bit set to a one informs the OS 103 of FIG. 1 in a definitivemanner when the control unit 110 had to access slow media for data,e.g., a cache miss.

Bit 3—Time parameters are valid. The type code set to a one and this bitset to a one indicates that all of time parameters are valid when timeparameters are included in the response message 1000.

Bit 4—Reserved.

Bits 5 to 7—These three bits are the type code that defines the formatof the TSA 1034 of the extended status section 1004. The names of theencodes are:

0. Reserved.

1. I/O Status. The extended status section 1004 contains valid endingstatus for the transport-mode I/O operation.

2. I/O Exception. The extended status section 1004 contains informationregarding termination of the transport-mode I/O operation due to anexception condition.

3. Interrogate Status. The extended status section 1004 contains statusfor an interrogate operation.

4. to 7. Reserved.

The DCW offset 1044 indicates an offset in the TCCB of a failed DCW.Similarly, the DCW residual count 1046 indicates the residual byte countof a failed DCW (i.e., where execution of the DCWs was interrupted).

In an exemplary embodiment, the TSA 1034 definition when the type codeof ES flags 1042 indicates a type of I/O Exception includes a reservedfield 1050, termination reason codes 1052, reason code qualifier (RCQ)words 1054, and optionally, appended device sense data 1056. Thetermination reason codes 1052 indicate the reason for the termination ofthe I/O operation. The RCQ words 1054 include values encoded formeanings corresponding to specific termination reason codes 1052.Exemplary termination reason codes 1052 include:

0. Null value for no information.

1. Transport command IU transport failure. The I/O device 112 detectedan invalid transport command IU, e.g., command message 900 of FIG. 9.

2. Invalid cyclic redundancy check (CRC) detected on output data. Thecontrol unit 110 detected an invalid CRC while receiving output data.

3. Incorrect transport command IU length specification.

4. TCAH specification error.

5. DCW specification error. There is an error with the DCW as designatedby the DCW offset 1044.

6. Transfer-direction specification error. The command specified by theDCW designated by the DCW offset 1044 specifies a direction of datatransfer that disagrees with the transfer direction specified in the TCH904.

7. Transport-count specification error.

8. Two I/O operations active to the same device address. The I/O device112 responds with this status to both I/O operations that are active forthe device address. When this error is detected the control unit 110also sets encode 4 “Device requested program check, possible IFCC” instatus flags one 1008.

When encode 4 in status flags one 1008 is detected by the channel 124,the channel 124 may notify the OS 103 of the device requested programcheck with a possible IFCC.

9. to 255. Reserved.

When termination reason codes 1052 indicate a transport command IUtransport failure (i.e., a value of 1), the RCQ words 1054 can includethe following information:

0. No additional information.

1. The length of the transport command IU received (e.g., commandmessage 900) does not match the L1 length 916.

2. LRC error. The LRC 990 does not validate the transport command IU.

3. to 255. Reserved.

When this error is detected the control unit 110 also sets encode 4“Device requested program check, possible IFCC” in status flags one1008. When encode 4 in status flags one 1008 is detected by the channel124, the channel 124 may notify the OS 103 of the device requestedprogram check with a possible IFCC.

When termination reason codes 1052 indicates an invalid CRC is detectedon output data (i.e., a value of 2), the RCQ words 1054 can include thefollowing information that identifies the starting and ending byte ofthe unit of data that was detected as being corrupted:

Response message 1000, word 12, (RCQ word 0) contains a 32-bit unsignedinteger offset of the first output data byte for which the invalid CRCwas detected.

Response message 1000, word 13, (RCQ word 1) contains the 32-bitunsigned integer offset of the last output-data byte for which theinvalid CRC was detected. When this error is detected the control unit110 also sets encode 4 “Device requested program check, possible IFCC”in status flags one 1008. When encode 4 in status flags one 1008 isdetected by the channel 124, the channel 124 may notify the OS 103 ofthe device requested program check with a possible IFCC. The OS 103determines if this error is a program check or an IFCC.

When termination reason codes 1052 indicate an incorrect transportcommand IU length specification (i.e., a value of 3), the RCQ words 1054can include the following:

0. No additional information.

1. The value specified by the L2 length 928 is not 8 greater than thevalue specified by the L1 length 916 in the transport command IU forthis operation (command message 900).

2. The value specified by the L2 length 928 is less than 20 or greaterthan 252.

3. to 255 Reserved.

When this error is detected the control unit 110 also sets encode 5“Device requested program check” in status flags one 1008. When encode 5in status flags one 1008 is detected by the channel 124, the channel 124may notify the OS 103 of the device requested program check.

When termination reason codes 1052 indicates a TCAH specification error(i.e., a value of 4), the RCQ words 1054 can include the following:

0. No additional information.

1. Format-field specification error. The format field 920 in the TCAH906 contains an unrecognized value.

2. Reserved field specification error. A reserved field in the TCAH 906does not contain zeros, e.g., reserved field 924, 926, 932 or 936.

3. Service action code field specification error. The service actioncode field 930 contains an unrecognized value or a value that isincorrect for a command specified by the DCW designated by the DCWoffset 1044.

4. to 255 Reserved.

When this error is detected the control unit 110 also sets encode 5“Device requested program check” in status flags one 1008. When encode 5in status flags one 1008 is detected by the channel 124, the channel 124may notify the OS 103 of the device requested program check.

When termination reason codes 1052 indicates a DCW specification errorat DCW offset 1044 (i.e., a value of 5), the RCQ words 1054 can includethe following:

0. No additional information.

1. Reserved field specification error. A reserved field in the DCW doesnot contain zeros, e.g., reserved field 952, 964, 974, or 984.

2. Flags field command chaining specification error. Either of thefollowing is true: a command-chaining flag is one and the offset of thenext DCW is such that all or part of the next DCW extends past the endof the TCA 908, or a command-chaining flag is zero and more than 3unused bytes remain in the TCA 908.

3. Control data count field specification error. Either of the followingis true: the command specified by the DCW requires control data and theCD count field (e.g., CD count 954, 966, 976, or 986) contains zeros, orthe CD count field (e.g., CD count 954, 966, 976, or 986) specifiescontrol data past the end of the TSA 908.

4. to 255 Reserved.

When this error is detected the control unit 110 also sets encode 5“Device requested program check” in status flags one 1008. When encode 5in status flags one 1008 is detected by the channel 124, the channel 124may notify the OS 103 of the device requested program check.

When termination reason codes 1052 indicates a transfer-directionspecification error (i.e., a value of 6), the RCQ words 1054 can includethe following:

0. No additional information.

1. Read-direction specification error. The DCW specifies an inputoperation, but the R-bit in the read/write field 918 is zero.

2. Write-direction specification error. The DCW specifies an outputoperation, but the W-bit in the read/write field 918 is zero.

3. to 255 Reserved.

When this error is detected the control unit 110 also sets encode 5“Device requested program check” in status flags one 1008. When encode 5in status flags one 1008 is detected by the channel 124, the channel 124may notify the OS 103 of the device requested program check.

When termination reason codes 1052 indicates a transport-countspecification error (i.e., a value of 7), the RCQ words 1054 can includethe following:

0. No additional information.

1. Read count specification error. The transport data byte count 992specifies a value that is not equivalent to the total count of databytes specified by the DCWs in the TCA 908.

2. Write count specification error. The transport data byte count 992specifies a value that is not equivalent to the total count of databytes specified by the DCWs in the TCA 908.

3. to 255 Reserved.

When this error is detected the control unit 110 also sets encode 5“Device requested program check” in status flags one 1008. When encode 5in status flags one 1008 is detected by the channel 124, the channel 124may notify the OS 103 of the device requested program check.

The appended device sense data 1056 is supplemental status that thecontrol unit 110 provides conditionally in response to an active unitcheck (UC) bit in the device status 1028. The amount of data in theappended device sense data 1056 can be determined by subtracting a fixedamount (e.g., 32 bytes) from the ES length field 1040.

The LRC word 1036 is a longitudinal redundancy check word of the TSH1032 and the TSA 1034, calculated in a similar fashion as the LRC word1030 in the status 1002 section of the response message 1000. The LRCword 1036 can be calculated on a variable number of words, dependingupon the number of words included in the appended device sense data1056.

In response to an exception condition detected at the channel subsystem108, an I/O interrupt is communicated to one or more of the CPUs 104.The I/O interrupt includes an interrupt response block (IRB) 1100, anexample portion (words 0-3) of which is depicted in FIG. 11. The IRB1100 includes a key 1102, a reserved field (R) 1104, an extended statusword (ESW) format field (L) 1106, and a deferred condition code field(CC) 1108. The IRB 1100 also includes IRB format fields F0 1110, F11112, F2 1114, and IRB format control field (X) 1116. The IRB 1100further includes interrogate complete field (Q) 1118, a reserved field(R) 1120, an extended control field (E) 1122, a path not operationalfield (N) 1124, a reserved field (R) 1126, a function control field (FC)1128, an activity control field (AC) 1130, and a status control field(SC) 1132. The IRB 1100 additionally includes a TCW address 1134, adevice status 1136, a sub-channel status 1138, a FICON-extended (FCX)status 1140, and a sub-channel extended status 1142.

In an exemplary embodiment, the key 1102, L 1106, CC 1108, E 1122, N1124, FC 1128, and SC 1132 are unchanged from the IRB format as definedin “IBM® z/Architecture Principles of Operation,” Publication No.SA22-7832-05, 6th Edition, April 2007. When the IRB format control fieldX 1116 is set to a one, the IRB format fields F0 1110, F1 1112, and F21114 are reserved for FCX use. The Q 1118 indicates completion of aninterrogate operation. The AC 1130 provides activity status information,such as pending status, sub-channel active status, and device activestatus. The TCW address 1134 indicates the TCW being executed when theinterrupted occurred.

The device status 1136 is copied from the device status 1028 of theresponse message 1000 of FIG. 10. The sub-channel status 1138 includesvarious checks and reserved values, e.g., program, protect, data, andcontrol checks. The FCX status 1140 is copied from the status flagsthree 1026 of the response message 1000 of FIG. 10. The sub-channelextended status 1142 provides an extension to the sub-channel status1138, adding details as to why a particular check condition occurred.For example, bit 0 of the sub-channel extended status 1142 can be set toindicate that a program check, protect check, or IFCC was the result ofan interrogate operation. A program check may be the result of a TCWchannel program error detected by the control unit 110. When a programcheck occurs, encoded values in bits 1 to 7 of the sub-channel extendedstatus 1142 can convey the following information:

0. Null value used for program check conditions that do not require avalue in the sub-channel extended status 1142.

1. Storage-Request limit exceeded. A model-dependent number of storagerequests have been exceeded for the requested block of data becausesoftware programming built an impossible to execute channel program.

2. Program check when the count in the transport command IU did notmatch the count the device expected.

3. Transport mode (i.e., TCW channel programs) is not supported in thecontrol unit 110. Execution of transport mode I/O was attempted to adevice that does not support transport mode.

4. Fibre Channel Extension (FCX) is not supported in the channel 124.Execution of transport mode I/O was attempted to a channel that does notsupport transport mode.

5. Reserved.

6. Program check on the TCW. The channel 124 detected an invalid TCW.

7. Device detected program check, possible IFCC. This encode is set ifthe channel 124 received encode 4 in status flags one 1008. This errormay be caused either by invalid control block structures in memory 102or the information was corrupted on its way to the I/O device 112. TheOS 103 may escalate this to an IFCC, if all of the parameters andcontrol blocks are correct in memory 102 for the operation. The channel124 may create a log on this error.

8. Device detected program check. This encode is set if the channel 124received encode 5 in status flags one 1008. This error may be caused byinvalid control block structures that were detected by the I/O device112.

9. to 31. Reserved.

Any one of the following encodes may be set in bits 1 to 7 as result ofa protect check, invalid address (program check) or uncorrectable error(channel control check or channel data check) received as a response toa storage operation:

32. Storage exception on a TCW fetch. The following errors can causethis:

-   -   a. Invalid address on a TCW fetch. Program check is set in the        sub-channel status 1138.    -   b. Protected address on a TCW fetch. Protect check will be set        in the sub-channel status 1138.    -   c. An uncorrectable error on a TCW fetch. Channel control check        is set in the sub-channel status 1138.

33. Storage exception on a TSB store. The following errors can causethis:

-   -   a. Invalid address on a TSB store. Program check is set in the        sub-channel status 1138    -   b. Protected address on a TSB store. Protect check is set in the        sub-channel status 1138.

34. Storage exception on a transport command IU fetch. The followingerrors can cause this:

-   -   a. Invalid address on a TCCB fetch. Program check is set in the        sub-channel status 1138.    -   b. Protected address on a TCCB fetch. Protect check is set in        the sub-channel status 1138.    -   c. An uncorrectable error on a TCCB fetch. Channel control check        is set in the sub-channel status 1138.

35. Storage exception on a TIDAL fetch. The following errors can causethis:

-   -   a. Invalid address on a TIDAL fetch. Program check is set in the        sub-channel status 1138.    -   b. Protected address on a TIDAL fetch. Protect check is set in        the sub-channel status 1138.    -   c. An uncorrectable error on a TIDAL fetch. Channel control        check is set in the sub-channel status 1138.

36. Storage exception on a data access. The following errors can causethis:

-   -   a. Invalid address on a data access. Program check is set in the        sub-channel status 1138.    -   b. Protected address on a data access. Protect check is set in        the sub-channel status 1138.    -   c. An uncorrectable error on a data access. Channel data check        is set in the sub-channel status 1138.

37. to 63 reserved.

Any one of the following encodes may be set in bits 1 to 7 as result ofan IFCC.

64. IFCC because of a CRC error detected by the channel 124 on databeing received from the control unit 110.

65. Reserved.

66. IFCC because of a Fibre Channel link protocol error.

67. IFCC occurred because a purge path command did not complete.

68. IFCC occurred on a purge path command because of an abort.

69. IFCC because a TCW residual count did not match the residual count1016. This can occur because the channel 124 or control unit 110 did notreceive all of data IUs.

70. Invalid LRC 1030.

71. Invalid LRC 1036.

72. to 127 reserved.

Turning now to FIG. 12, a process 1200 for providing exception conditionfeedback at a control unit to a channel subsystem in an I/O processingsystem will now be described in accordance with exemplary embodiments,and in reference to the I/O processing system 100 of FIG. 1. At block1202, the control unit 110 receives a command message from channel 124in the channel subsystem 108. The command message may be a transportcommand IU, including a TCCB with multiple DCWs as part of a TCW channelprogram, e.g., command message 900 of FIG. 9. Communication between thechannel subsystem 108 and the control unit 110 may be managed by the CUcontrol logic 802 and the CHN control logic 810 of FIG. 8 for a specificchannel 124 of the channel subsystem 108.

At block 1204, the control unit 110 detects an exception condition inresponse to unsuccessful execution of at least one command in thecommand message. The exception condition may be relative to the commandmessage format, I/O device 112 with which the control unit 110interfaces, or other conditions as previously described in reference toFIGS. 10 and 11.

At block 1206, the control unit 110 identifies a termination reason codeassociated with the exception condition. Other status flags, DCW offsetand RCQ words associated with the exception condition can also be set inresponse to the exception condition as previously described.

At block 1208, the control unit 110 writes the termination reason codeto a transport response IU message (e.g., response message 1000 of FIG.10, including a status section 1002 and an extended status section1004). The transport response IU message includes exception conditionfeedback identifying a termination reason code (e.g., termination reasoncodes 1052 of FIG. 10) in response to unsuccessful execution of at leastone command in the command message. Additional status flags, DCW offsetand RCQ words can also be included in the transport response IU message.

At block 1210, the control unit 110 sends the transport response IUmessage to the channel subsystem 108. The channel subsystem 108 storesthe extended status 1004 at status area 408 referenced by TCW 402 ofFIG. 4. The channel subsystem 108 can then use the exception conditionfeedback information in the transport response IU message to interruptCPU 104 to provide exception condition information in IRB 1100 of FIG.11 and the extended status at location 104 of FIG. 4.

Technical effects of exemplary embodiments include providing ofexception condition feedback to a channel subsystem from a control unitin an I/O processing system. The control unit provides the channelsubsystem with notice of exception conditions, including terminationreason codes, DCW offset and RCQ words, in a response message from acontrol unit. The channel subsystem can trigger an interrupt to a CPU inthe I/O processing system, and provide both status and extended statusinformation related to the exception conditions. Advantages includeenabling control units to execute multiple commands unless/until anexception condition is encountered. Further advantages include providingenhanced reporting of exception conditions to a CPU via a channelsubsystem interrupt, where a control unit identifies the exceptionconditions. Detecting exception conditions at the control unit mayreduce the processing burden on the channel subsystem, as the channelsubsystem can act as an information conduit without performing anadditional layer of detailed checks of commands sent to the controlunit.

As described above, embodiments can be embodied in the form ofcomputer-implemented processes and apparatuses for practicing thoseprocesses. In exemplary embodiments, the invention is embodied incomputer program code executed by one or more network elements.Embodiments include a computer program product 1300 as depicted in FIG.13 on a computer usable medium 1302 with computer program code logic1304 containing instructions embodied in tangible media as an article ofmanufacture. Exemplary articles of manufacture for computer usablemedium 1302 may include floppy diskettes, CD-ROMs, hard drives,universal serial bus (USB) flash drives, or any other computer-readablestorage medium, wherein, when the computer program code logic 1304 isloaded into and executed by a computer, the computer becomes anapparatus for practicing the invention. Embodiments include computerprogram code logic 1304, for example, whether stored in a storagemedium, loaded into and/or executed by a computer, or transmitted oversome transmission medium, such as over electrical wiring or cabling,through fiber optics, or via electromagnetic radiation, wherein, whenthe computer program code logic 1304 is loaded into and executed by acomputer, the computer becomes an apparatus for practicing theinvention. When implemented on a general-purpose microprocessor, thecomputer program code logic 1304 segments configure the microprocessorto create specific logic circuits.

While the invention has been described with reference to exemplaryembodiments, it will be understood by those skilled in the art thatvarious changes may be made and equivalents may be substituted forelements thereof without departing from the scope of the invention. Inaddition, many modifications may be made to adapt a particular situationor material to the teachings of the invention without departing from theessential scope thereof. Therefore, it is intended that the inventionnot be limited to the particular embodiment disclosed as the best modecontemplated for carrying out this invention, but that the inventionwill include all embodiments falling within the scope of the appendedclaims. Moreover, the use of the terms first, second, etc. do not denoteany order or importance, but rather the terms first, second, etc. areused to distinguish one element from another. Furthermore, the use ofthe terms a, an, etc. do not denote a limitation of quantity, but ratherdenote the presence of at least one of the referenced item.

1. A computer program product for providing exception condition feedbackat a control unit to a channel subsystem in an input/output (I/O)processing system, the computer program product comprising: a tangiblestorage medium readable by a processing circuit and storing instructionsfor execution by the processing circuit for performing a methodcomprising: receiving a command message at the control unit from thechannel subsystem; detecting an exception condition in response tounsuccessful execution of at least one command in the command message;identifying a termination reason code associated with the exceptioncondition; writing the termination reason code to a response message;and sending the response message to the channel subsystem.
 2. Thecomputer program product of claim 1 wherein the termination reason codeidentifies one or more of: invalidity of the command message, an invalidcyclic redundancy check (CRC), incorrect length of the command message,a transport command area header error, a device control word (DCW)specification error, a transfer direction specification error, atransport count specification error, and two active I/O operations to acommon device address.
 3. The computer program product of claim 1wherein the exception condition feedback further includes a reason codequalifier providing encoded meaning corresponding to the terminationreason code.
 4. The computer program product of claim 3 wherein thereason code qualifier includes information on one or more of: a lengthmismatch of the command message, a longitudinal redundancy check (LRC)error, and a field specification error in the command message.
 5. Thecomputer program product of claim 4 wherein the field specificationerror is one of: a format field specification error, a reserved fieldspecification error, a service action code field specification error, aflags field command chaining specification error, a control data countfield specification error, a direction specification error, and a countspecification error.
 6. The computer program product of claim 1 whereinthe response message includes a status section and an extended statussection, the extended status section including the termination reasoncode.
 7. The computer program product of claim 6 wherein the statussection includes one or more flags capable of declaring one of: a devicelevel exception, a link reject, a resetting event, a device requestedprogram check, and a device requested program check with a possibleinterface control check.
 8. The computer program product of claim 6wherein the extended status section is configurable to support aplurality of type codes.
 9. The computer program product of claim 1wherein the command message is a transport command information unitincluding a transport command header, a transport command area header, atransport command area, and a transport command area trailer.
 10. Thecomputer program product of claim 9 wherein the method furthercomprises: performing one or more checks on the transport commandheader, the transport command area header, the transport command area,and the transport command area trailer to detect the exception conditionat the control unit.
 11. An apparatus for providing exception conditionfeedback in an input/output (I/O) processing system, the apparatuscomprising: a control unit in communication with a channel subsystem,the control unit performing a method comprising: receiving a commandmessage at the control unit from the channel subsystem; detecting anexception condition in response to unsuccessful execution of at leastone command in the command message; identifying a termination reasoncode associated with the exception condition; writing the terminationreason code to a response message; and sending the response message tothe channel subsystem.
 12. The apparatus of claim 11 wherein thetermination reason code identifies one or more of: invalidity of thecommand message, an invalid cyclic redundancy check (CRC), incorrectlength of the command message, a transport command area header error, adevice control word (DCW) specification error, a transfer directionspecification error, a transport count specification error, and twoactive I/O operations to a common device address.
 13. The apparatus ofclaim 11 wherein the exception condition feedback further includes areason code qualifier providing encoded meaning corresponding to thetermination reason code.
 14. The apparatus of claim 13 wherein thereason code qualifier includes information on one or more of: a lengthmismatch of the command message, a longitudinal redundancy check (LRC)error, and a field specification error in the command message.
 15. Theapparatus of claim 14 wherein the field specification error is one of: aformat field specification error, a reserved field specification error,a service action code field specification error, a flags field commandchaining specification error, a control data count field specificationerror, a direction specification error, and a count specification error.16. The apparatus of claim 11 wherein the response message includes astatus section and an extended status section, the extended statussection including the termination reason code.
 17. The apparatus ofclaim 16 wherein the status section includes one or more flags capableof declaring one of: a device level exception, a link reject, aresetting event, a device requested program check, and a devicerequested program check with a possible interface control check.
 18. Theapparatus of claim 16 wherein the extended status section isconfigurable to support a plurality of type codes.
 19. The apparatus ofclaim 11 wherein the command message is a transport command informationunit including a transport command header, a transport command areaheader, a transport command area, and a transport command area trailer.20. The apparatus of claim 19 wherein the control unit performing themethod further comprises: performing one or more checks on the transportcommand header, the transport command area header, the transport commandarea, and the transport command area trailer to detect the exceptioncondition at the control unit.
 21. A method for providing exceptioncondition feedback at a control unit to a channel subsystem in aninput/output (I/O) processing system, the method comprising: receiving acommand message at the control unit from the channel subsystem;detecting an exception condition in response to unsuccessful executionof at least one command in the command message; identifying atermination reason code associated with the exception condition; writingthe termination reason code to a response message; and sending theresponse message to the channel subsystem.
 22. The method of claim 21wherein the termination reason code identifies one or more of:invalidity of the command message, an invalid cyclic redundancy check(CRC), incorrect length of the command message, a transport command areaheader error, a device control word (DCW) specification error, atransfer direction specification error, a transport count specificationerror, and two active I/O operations to a common device address, andfurther wherein the exception condition feedback further includes areason code qualifier including information on one or more of: a lengthmismatch of the command message, a longitudinal redundancy check (LRC)error, and a field specification error in the command message.
 23. Themethod of claim 21 wherein the response message includes a statussection and an extended status section, the status section including oneor more flags capable of declaring one of: a device level exception, alink reject, a resetting event, a device requested program check, and adevice requested program check with a possible interface control check,and the extended status section including the termination reason code.24. The method of claim 21 wherein the command message is a transportcommand information unit including a transport command header, atransport command area header, a transport command area, and a transportcommand area trailer.
 25. The method of claim 24 further comprising:performing one or more checks on the transport command header, thetransport command area header, the transport command area, and thetransport command area trailer to detect the exception condition at thecontrol unit.